﻿@model SimpleTaskManager.Domain.Entities.User
@using SimpleTaskManager.WebUI.HtmlHelpers;

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)

    <fieldset id="newUser">
        <legend>New Employee</legend>

        <table>
            <tr>
                <td>
                    <fieldset>
                        <legend>Personal details</legend>

                        <p class="editor-label">
                            @Html.LabelFor(model => model.FirstName)
                        </p>
                        <p class="editor-field">
                            @Html.EditorFor(model => model.FirstName)
                            @Html.ValidationMessageFor(model => model.FirstName)
                        </p>
                        <br />

                        <p class="editor-label">
                            @Html.LabelFor(model => model.LastName)
                        </p>
                        <p class="editor-field">
                            @Html.EditorFor(model => model.LastName)
                            @Html.ValidationMessageFor(model => model.LastName)
                        </p>
                        <br />

                        <p class="editor-label">
                            @Html.LabelFor(model => model.Login)
                        </p>
                        <p class="editor-field">
                            @Html.EditorFor(model => model.Login)
                            @Html.ValidationMessageFor(model => model.Login)
                        </p>
                        <br />

                        <p class="editor-label">
                            @Html.LabelFor(model => model.Password)
                        </p>
                        <p class="editor-field">
                            @Html.EditorFor(model => model.Password)
                            @Html.ValidationMessageFor(model => model.Password)
                        </p>
                        <br />

                        <p class="editor-label">
                            @Html.LabelFor(model => model.PersonalIdentifier)
                        </p>
                        <p class="editor-field">
                            @Html.EditorFor(model => model.PersonalIdentifier)
                            @Html.ValidationMessageFor(model => model.PersonalIdentifier)
                        </p>
                        <br />

                        <p class="editor-label">
                            @Html.LabelFor(model => model.DateOfBirth)
                        </p>
                        <p class="editor-field">
                            @Html.EditorFor(model => model.DateOfBirth)
                            @Html.ValidationMessageFor(model => model.DateOfBirth)
                        </p>
                    </fieldset>

                     <fieldset>
                        <legend>Contact details</legend>
        
                        <p class="editor-label">
                            @Html.LabelFor(model => model.Address)
                        </p>
                        <p class="editor-field">
                            @Html.EditorFor(model => model.Address)
                            @Html.ValidationMessageFor(model => model.Address)
                        </p>

                        <p class="editor-label">
                            @Html.LabelFor(model => model.City)
                        </p>
                        <p class="editor-field">
                            @Html.EditorFor(model => model.City)
                            @Html.ValidationMessageFor(model => model.City)
                        </p>

                        <p class="editor-label">
                            @Html.LabelFor(model => model.Country)
                        </p>
                        <p class="editor-field">
                            @Html.EditorFor(model => model.Country)
                            @Html.ValidationMessageFor(model => model.Country)
                        </p>

                        <p class="editor-label">
                            @Html.LabelFor(model => model.ZIP)
                        </p>
                        <p class="editor-field">
                            @Html.EditorFor(model => model.ZIP)
                            @Html.ValidationMessageFor(model => model.ZIP)
                        </p>

                        <p class="editor-label">
                            @Html.LabelFor(model => model.Email)
                        </p>
                        <p class="editor-field">
                            @Html.EditorFor(model => model.Email)
                            @Html.ValidationMessageFor(model => model.Email)
                        </p>

                        <p class="editor-label">
                            @Html.LabelFor(model => model.Phone)
                        </p>
                        <p class="editor-field">
                            @Html.EditorFor(model => model.Phone)
                            @Html.ValidationMessageFor(model => model.Phone)
                        </p>

                    </fieldset>
                </td>
                <td>
                    <fieldset>
                        <legend>Company details</legend>

                        <p class="editor-label">
                            @Html.LabelFor(model => model.Role)
                        </p>
                        <p class="editor-field">
                            @Html.EnumDropDownListFor(model => model.Role)
                            @Html.ValidationMessageFor(model => model.Role)
                        </p>



                        <p class="editor-label">
                            @Html.LabelFor(model => model.Position)
                        </p>
                        <p class="editor-field">
                            @Html.EditorFor(model => model.Position)
                            @Html.ValidationMessageFor(model => model.Position)
                        </p>

        

                        <p class="editor-label">
                            @Html.LabelFor(model => model.Status)
                        </p>
                        <p class="editor-field">
                            @Html.EnumDropDownListFor(model => model.Status)
                            @Html.ValidationMessageFor(model => model.Status)
                        </p>
                    </fieldset>

                    <fieldset>
                        <legend>Skills</legend>
                       
                    </fieldset>
                </td>
            </tr>
        </table>

         <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<p>
    @Html.ActionLink("Back to List", "Index")
</p>
